Bug 535453 - gdk_pixbuf_format_get_license returns NULL for
authorMatthias Clasen <matthiasc@src.gnome.org>
Thu, 29 May 2008 21:04:52 +0000 (21:04 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 29 May 2008 21:04:52 +0000 (21:04 +0000)
        any of the loaders

        * queryloaders.c (write_loader_info): Add the license info
        after the description.

        * gdk-pixbuf-io.c (gdk_pixbuf_io_init): Read the license info
        from the module file. Reported by Andrey Tsyvarev.

svn path=/trunk/; revision=20241

gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-io.c
gdk-pixbuf/queryloaders.c

index c45405715a0020ca11969f29444873e0f364f92a..01564251097063c5d1f9bc67e009cbf97da7f7ba 100644 (file)
@@ -1,3 +1,14 @@
+2008-05-29  Matthias Clasen  <mclasen@redhat.com>
+
+       Bug 535453 - gdk_pixbuf_format_get_license returns NULL for 
+       any of the loaders
+
+       * queryloaders.c (write_loader_info): Add the license info
+       after the description.
+
+       * gdk-pixbuf-io.c (gdk_pixbuf_io_init): Read the license info
+       from the module file. Reported by Andrey Tsyvarev.
+
 2008-05-28  Michael Natterer  <mitch@imendio.com>
 
        * gdk-pixbuf.h: define GDK_PIXBUF_H_INSIDE around including all
index 62c676ff5cc9f6818bc5ea464036d0abafeb036c..f441e7c3348a2a1b8bc79b490d3892f3c8c56a17 100644 (file)
@@ -466,6 +466,10 @@ gdk_pixbuf_io_init (void)
                                have_error = TRUE;
                        }                       
                        module->info->description = g_strdup (tmp_buf->str);
+
+                       if (scan_string (&p, tmp_buf)) {
+                               module->info->license = g_strdup (tmp_buf->str);
+                       }
                }
                else if (!module->info->mime_types) {
                        int n = 1;
index 6a3a7c5694fac29abe90ed64e1394b411fa55cd0..bf98b10420f32b08597e196f29df2cabb990fa42 100644 (file)
@@ -127,9 +127,9 @@ write_loader_info (const char *path, GdkPixbufFormat *info)
        char **ext; 
 
        g_printf("\"%s\"\n", path);
-       g_printf ("\"%s\" %u \"%s\" \"%s\"\n", 
+       g_printf ("\"%s\" %u \"%s\" \"%s\" \"%s\"\n", 
                  info->name, info->flags, 
-                 info->domain ? info->domain : GETTEXT_PACKAGE, info->description);
+                 info->domain ? info->domain : GETTEXT_PACKAGE, info->description, info->license);
        for (mime = info->mime_types; *mime; mime++) {
                g_printf ("\"%s\" ", *mime);
        }